<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head th:replace="/common/include :: header(~{::title}, ~{::link}, ~{::style})">
    <title>DEMO-表格-组合表头</title>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="col-sm-12 select-table table-bordered">
        <table id="bootstrap-table"></table>
    </div>
</div>

<div th:replace="/common/include :: footer"></div>

<script th:inline="javascript">

    $(function () {
        var options = {
            code: 'ID',
            url: ctx + 'public/demo/table',
            search: false,
            showExport: false,
            pagination: true,
            columns: [
                [{
                    title: '主键',
                    align: 'center',
                    colspan: 2
                }, {
                    title: '基本信息',
                    align: 'center',
                    colspan: 2
                }],
                [{
                    checkbox: true
                },{
                    field: 'ID',
                    title: 'ID'
                },{
                    field: 'NAME',
                    title: '姓名'
                },
                {
                    field: 'AGE',
                    title: '年龄'
                }]
            ]
        };

        $.table.init('bootstrap-table', options);
    });
</script>
</body>
</html>
